<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8"/>
    <meta property="qc:admins" content="646274737761211056727" />
    <title><%if $meta.title%><%$meta.title%>-<%/if%><%$FIRST_TITLE%></title>

    <!-- Mobile viewport optimisation -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="keywords" content="<%$meta.keywords%>">
    <meta name="description" content="<%$meta.description%>">

    <!--[if lte IE 7]>
    <link href="../yaml/core/iehacks.css" rel="stylesheet" type="text/css" />
    <![endif]-->
    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <!--<script src="http://siteapp.baidu.com/static/webappservice/uaredirect.js" type="text/javascript"></script><script type="text/javascript">uaredirect("http://m.ijiapu.org");</script>-->
    <link href="<%$CSS_DIR%>/main.css" rel="stylesheet" type="text/css"/>
    <script src="<%$JS_DIR%>/jquery-1.7.2.min.js"></script>
    <script src="<%$JS_DIR%>/region.js"></script>

    <%if $session.oauth == 'pengyou'%>
    <style type="text/css">
      body{width: 750px; border1: 3px solid red;}
      .main-info-box{overflow-y: scroll; height: 670px}
    </style>
    <input type="hidden" id="qq_open_id" value="<%$session.oauth == 'pengyou'%>"/>
    <%else%>
    <style type="text/css">
    </style>
    <%/if%>
    <script>lteIE6=false;</script>
    <!--[if lte IE 6]><script>lteIE6=true;</script><![endif]-->
  </head>
  <body>
    <header>
      <div class="wrapper">
	<div class="ym-wbox1">
          <div class="color1" colorattr="background">
	    <div class="left" id="div-logo">
	      <a href="/" ><img alt='logo' width="256" height="70" src="<%$IMG_DIR%>/logo.png"/></a>
	      <span><%$SECOND_TITLE%></span>
            </div>
            <div class="right" id='subscribe'>
              <form action="/index/subscribes" method='post'>
                  订阅家谱百科月刊：<br/>
		  <input required type='email' name='email' placeholder='youremail@aaa.com'/>
                  <input type='submit' class="button" value='免费订阅'/>
              </form>
            </div>
	    <div class="clear">
            </div>
          </div>

	  <nav id="nav" class="color2" colorattr="background">
	      <ul>
		<li <%if $ModuleAction eq "index" and $MethodAction eq "index" %>class="active"<%/if%>><a class="color3" colorattr="color" href="/">首页</a></li>
		<li <%if $ModuleAction eq "surnames" %>class="active"<%/if%>><a class="color3" colorattr="color" href="/surnames/index">百家姓</a></li>
		<li <%if $ModuleAction eq "users" && $MethodAction eq "show_photo_wall" %> class="active"<%/if%>><a class="color3" colorattr="color" href="/users/show_photo_wall">照片墙</a></li>
		<%if $session.id%>
		<li <%if $ModuleAction eq "family" %>class="active"<%/if%>><a class="color3" colorattr="color" href="/family/manage">管理家谱</a></li>
		<li <%if $ModuleAction eq "users" && $MethodAction ne "show_photo_wall" && $user.id eq $session.id %>class="active"<%/if%>><a class="color3" colorattr="color" href="/users/home?userid=<%$session.id%>">个人信息</a></li>
		<%/if%>
		
		<%if $messages|@count gt 0 %><li><a class="color3" colorattr="color" href="/request/messages">您有<%$messages|@count%>条消息</a></li><%/if%>
		
		<%if $session.id && $session.oauth != 'pengyou'%><li><a class="color3" colorattr="color" href="/index/logout">退出</a></li><%/if%>
	      </ul>

	      <form class="searchform" action="/users/search" method="get">
	      <%if $session.id%>
              <label><%$session.realname%></label>
	      <%else%>
              <!-- <a class="color3" colorattr="color" href="/users/register">免费注册</a> -->
              <a class="color3" colorattr="color" href="/users/login">登录/注册</a>
	      <%/if%>
		<input type="hidden" name="userid" value="<%$userid%>"/>
		<input required class="searchfield" type="search" maxlength="6" placeholder="输入人名查询" name="realname"/>
		<input class="searchbutton" type="submit" value="查找" />
	      </form>
              <div class="clear"></div>
	  </nav>
	</div>
      </div>
    </header>
    <div class="horizontal-center" style="width: 960px;">
	<!-- baidu advertise 
	<script type="text/javascript">
	var cpro_id = "u1124720";
	</script>
	<script src="http://cpro.baidustatic.com/cpro/ui/c.js" type="text/javascript"></script>
	-->
    </div>
 
